using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Sys;
using net_work.Data.Entity.Sys;

namespace net_work.IService.Sys;

public interface IPersonService
{
    /// <summary>
    /// 分页查询个人
    /// </summary>
    /// <param name="request">查询参数</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<Person>> GetPeoplePagedAsync(PagedRequest request);

    /// <summary>
    /// 根据个人ID查询个人信息
    /// </summary>
    /// <param name="personId">个人ID</param>
    /// <returns>个人信息</returns>
    Task<Person?> SelectByIdAsync(long personId);

    /// <summary>
    /// 插入个人
    /// </summary>
    /// <param name="personAddRequest">新增个人实体</param>
    /// <returns>新增个人ID</returns>
    Task<long> InsertPerson(PersonAddRequest personAddRequest);

    /// <summary>
    /// 更新个人信息
    /// </summary>
    /// <param name="personUpdateRequest">更新个人信息</param>
    /// <returns>是否成功</returns>
    Task<int> UpdatePerson(PersonUpdateRequest personUpdateRequest);

    /// <summary>
    /// 删除个人
    /// </summary>
    /// <param name="ids">个人ID集合</param>
    /// <returns>是否成功</returns>
    Task<int> DeletePersonByIds(List<long> ids);
}